home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / NextAnswers / 1182_loadable_palette_inspector_problems.rtf < prev    next >
Text File  |  1995-06-12  |  1KB  |  45 lines

  1. {\rtf0\ansi{\fonttbl\f0\fnil Times-Roman;\f2\fmodern Ohlfs;}
  2. \paperw13040
  3. \paperh10800
  4. \margl120
  5. \margr120
  6. {\colortbl;\red0\green0\blue0;}
  7. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\b0\i0\ulnone\fs28\fc0\cf0 Q:  I've created a loadable palette for InterfaceBuilder according to the instructions in the Release Notes.  I then created an inspector, and wrote all of the appropriate routines.  Now, I'm trying to use this from within InterfaceBuilder.  If I drag my object from the palette, and then modify some of its attributes and select OK, the inspector doesn't remember the settings when I select the object again at a later time.  Why?\
  8. \
  9. A:  This isn't documented, but within the 
  10. \b ok:
  11. \b0\i sender
  12. \i0  method for your inspector object, you should call the 
  13. \b ok:
  14. \b0  method for its super class, and return that value. Here's a template for your 
  15. \b ok:
  16. \b0  method.\
  17. \
  18.  
  19. \f2\fs22     ok:sender\
  20.     \{\
  21.         /* do a bunch of stuff in here */\
  22.         return [super ok:sender];\
  23.     \}\
  24.  
  25. \f0\fs28\fc1\cf1 \
  26. This is also true for the 
  27. \b revert:
  28. \b0  method.  You should call the super class's 
  29. \b revert:
  30. \b0  method from within the object's.  Like this:\
  31. \
  32.  
  33. \f2\fs22     revert:sender\
  34.     \{\
  35.         /* do a bunch of stuff in here */\
  36.         return [super revert:sender];\
  37.     \}\
  38.  
  39. \f0\fs28 \
  40. QA750\
  41. \
  42. Valid for 2.0, 3.0\
  43. \
  44.  
  45.